package programs.expression.superClasses;

import java.util.HashSet;
import java.util.Set;
import programs.expression.implementedClasses.*;

import be.kuleuven.cs.som.annotate.Basic;

public abstract class BasicExpression extends Expression {
	
	private Object value;
	
	public BasicExpression(Object value) {
		this.value = value;
		if(!isValidExpression())
			this.value = null;
	}

	@Override
	public Set<Variable> getVariables(){
		return new HashSet<Variable>();
	}
	@Override @Basic 
	public Object getValue() {
		return this.value;
	}
	
	public void setValue(Object value) {
		this.value = value;
	}

	@Override
	public abstract ExpressionType getReturnType();

	@Override
	public abstract boolean isValidExpression();
}
